import React, { Component } from 'react';
import { connect } from "react-redux";
import { Table } from 'antd';

class SetUp extends Component {
    constructor(props) {
        super(props);
        this.state = {
            data: [],
            pageNum: 1,
            pageSize: 10,
            userName: '',
            email: '',
            gender: '',
            phone: '',
            startTime: '',
            endTime: '',
        }

        this.columns = [
            {
                title: 'ID',
                dataIndex: 'orderId',

            },
            {
                title: '内容',
                dataIndex: 'publishMember',

            },

            {
                title: '操作',
                dataIndex: 'orderPrice',
            },



        ];
    }
    componentDidMount() {
        this.init();
    }

    // handleEditUser = (record) => {
    //
    // }

    init = () => {
        const { OrderList } = this.props
        // OrderList({ page: 1, size: 10 })
    }

    handleChangeOrderList = (current, pageSize) => {
        this.props.OrderList({ page: current, size: 10 })
    }

    render() {
        const { data, userTotal, userLoading } = this.props;
        const { pageNum, pageSize } = this.state;


        // const pagination = {
        // current: data.current,//当前页
        // total: data.total,//总条数
        // pageSize: data.size,//页大小
        // onChange: this.handleChangeOrderList,
        // showQuickJumper: true,//快速跳转
        // showSizeChanger: false//大于50时显示pageSize切换器
        // };
        return (
            <div>
                <Table columns={this.columns}
                // loading={userLoading} dataSource={data.records} rowKey={record => record.uid} pagination={pagination} 
                />
            </div>
        );
    }
}


const mapState = state => ({
    // ...state.order
});

const mapDispatch = dispatch => ({
    // ...dispatch.order

})

export default connect(mapState, mapDispatch)(SetUp);